Skip to content

Conversation

xiphmont
Copy link

@xiphmont xiphmont commented Mar 12, 2021

Two fixes:

Correct a serious memcpy bounds error causing all > 512 byte responses to crash the request and hang the aac interface. For example, this prevents zoning configuration requests from succeeding.

Fix a minor argument problem where checking for an unset i_params variable is branching based on stack garbage. This is relevant when -I is intuited rather than explicit.

Monty added 2 commits March 11, 2021 17:13
send_req_aac correctly calculates the maximum response size it can
process at a time with a 512 byte FIB data buffer, but inadvertanly
ignores this value and uses the full response length in the response
memcpy, corrupting memory when the response is greater than 512
bytes [minus headers] as with eg zone control requests.
Although the gpio utils already initialize the i_params
buffers, the other utilities do not.  In several places (eg,
in smp_initiator_open) this results in request decisions being made
based on preexisting stack contents when no interface parameter is
explicitly specified.

Patch kills this pattern globally and always initializes i_params.
@xiphmont xiphmont changed the title Fix several bugs causing smp requests to crash/hang on Adaptec adapters Fix for smp request crash/hang on Adaptec adapters Mar 12, 2021
@doug-gilbert
Copy link
Owner

Applied those fixes by hand on my local subversion repository and uploaded them here. Thanks for your input, sorry for the delay, expected to get an email from github as with some other repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants